// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import {api} from './server/api'

//引入mock模块
require('./mock/mock.js')

// import http from './server/http'
// Vue.prototype.$http = http

Vue.config.productionTip = false

Vue.prototype.$api = api

import { Button, List,Row, Col, Cell, Tabbar, TabbarItem,Icon,Search,Image as VanImage,Tag ,NavBar,Field,
  Popup,Grid, GridItem,SwipeCell,Overlay,Toast,Collapse, CollapseItem,Tab, Tabs,Empty } from 'vant'
Vue.use(Button)
Vue.use(Cell)
Vue.use(Col)
Vue.use(Row)
Vue.use(List)
Vue.use(Tabbar).use(TabbarItem)
Vue.use(Icon)
Vue.use(Search)
Vue.use(VanImage)
Vue.use(Tag)
Vue.use(NavBar)
Vue.use(Field)
Vue.use(Popup)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(SwipeCell)
Vue.use(Overlay)
Vue.use(Toast)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Empty)


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,  //store:store 和router一样，将我们创建的Vuex实例挂载到这个vue实例中
  components: { App },
  template: '<App/>'
})
